<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<LCA.Community.DAL.Model.Question>" %>
<%@ Import Namespace="LCA.Community.DAL.Model"%>

<asp:Content ID="Content2" ContentPlaceHolderID="HeaderContent" runat="server">
    <script src="<%= Url.Content("~/Scripts/MicrosoftAjax.js") %>" type="text/javascript"></script>
    <script src="<%= Url.Content("~/Scripts/MicrosoftMvcValidation.js") %>" type="text/javascript"></script>     
    <script src="<%= Url.Content("~/Scripts/tiny_mce/tiny_mce.js") %>" type="text/javascript"></script>
    <script type="text/javascript">
        tinyMCE.init({
            mode: "textareas",
            theme: "advanced",
            plugins: "emotions,preview,searchreplace,insertdatetime",
            theme_advanced_buttons1: "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,|,styleselect,formatselect,fontselect,fontsizeselect,|,hr,removeformat,visualaid,|,charmap",
            theme_advanced_buttons2: "cut,copy,paste,pastetext,pasteword,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,emotions,cleanup,help,code,|,insertdate,inserttime,preview,|,forecolor,backcolor,|,sub,sup",
            theme_advanced_buttons3: "",
            theme_advanced_toolbar_location: "top",
            theme_advanced_toolbar_align: "left"
        });
    </script> 
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
        <div class="content-main">
            <h2><img src="<%= Url.Content("~/Content/images/FinalDesign/Icons/questionmark24.png") %>" />Editar Pregunta</h2>
            <% Html.EnableClientValidation(); %>
            <% using (Html.BeginForm()) {%>
                    <table cellspacing="10">
                        <tr>
                            <td><%= Html.LabelFor(m => m.Title) %></td>
                            <td>
                                <%= Html.TextBoxFor(m => m.Title, new { size = "100" })%>
                                <%= Html.ValidationMessageFor(m => m.Title)%>
                            </td>
                        </tr>
                        <tr>
                            <td><%= Html.LabelFor(m => m.Tags) %></td>
                            <td>
                                <%= Html.TextBoxFor(m => m.Tags, new { size = "70" })%>
                                <%= Html.ValidationMessageFor(m => m.Tags)%>                    
                            </td>
                        </tr>                    
                    </table>
                    <%= Html.LabelFor(m => m.Body)%>        
                    <%= Html.TextAreaFor(m => m.Body, new { style = "height:250px" })%>
                    <%= Html.ValidationMessageFor(m => m.Body)%>    
                    <%= Html.Hidden("Author",Session["ID"]) %>        
                    <%= Html.Hidden("RowKey",Model.RowKey) %>
                    <input type="submit" value="Actualizar" />
            <% } %>
    </div>

    <div class="content-right">
        <% Html.RenderPartial("QuestionMenu"); %>
    </div>    
</asp:Content>
